Skip to content

feat: Guided Tours Framework (Navigating the Editor)#2299

Draft
camielvs wants to merge 1 commit into
05-28-feat_save_and_resume_paused_toursfrom
05-20-feat_learning_hub_tour_framework_and_first_tour
Draft

feat: Guided Tours Framework (Navigating the Editor)#2299
camielvs wants to merge 1 commit into
05-28-feat_save_and_resume_paused_toursfrom
05-20-feat_learning_hub_tour_framework_and_first_tour

Conversation

@camielvs
Copy link
Copy Markdown
Collaborator

@camielvs camielvs commented May 21, 2026

Description

The editor-side tour bridge: a single React component that listens for tour-step interactions in the editor and advances the tour when the prompted user action happens. Sufficient to power the first tour (#2306, Navigating the Editor) — later PRs extend it with additional interaction types.

The framework foundation (route, provider, popover, hub UI, types) lives in #2348. This PR replaces the empty EditorTourBridge.tsx stub from #2348 with its actual implementation.

Architecture

EditorTourBridge (src/routes/v2/pages/Editor/components/EditorTourBridge.tsx)

Reads the current step from useTour(). If the step declares an interaction, the bridge wires up a listener that auto-advances the tour when the user performs that action. Three interactions:

  • select-task — advances when the user clicks an element whose ancestor matches [data-tour-node="task"] (the stable selector added by feat: Guided Tour - Navigating the Editor #2306; not React Flow's CSS class, so library renames don't break it).
  • undock-window — advances when a docked panel matching targetWindowId is dragged out of its dock area.
  • redock-window — advances when a floating window matching targetWindowId is dropped back into a dock.

Helpers

  • followWindowPosition — runs alongside any step with a targetWindowId, keeping the highlight following a floating panel as the user drags it. Throttled to one resize-event-dispatch per animation frame.
  • trackDockStateTransition — observes dockState changes across all windows (or one specific target) to detect undock/redock. Records a baseline at step start and fires when a baselined window crosses the transition.
  • Direction tracking — when the user navigates back via the prev arrow, the bridge knows to skip in the reverse direction if the step's prompted state can't be re-entered.

Skip-with-fallback

Each interaction checks whether its prompted state is already satisfied when the step lands (e.g. the user has already undocked the target window). If so, the step's fallbackContent (declared in the tour JSON) replaces its content and the interaction is disabled — the step becomes a non-interactive informational beat the user can advance past with Next.

Related Issue and Pull requests

Progresses https://github.com/Shopify/oasis-frontend/issues/583

Builds on #2348 (foundation). First consumer is #2306 (Navigating the Editor). Later PRs in the stack (#2347) add more interaction types on top.

Type of Change

  • New feature

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Test Instructions

No visible behavior on its own — the registry from #2348 is still empty. Test in context with #2306 on top:

  • Walk through the Navigating the Editor tour. The interactive steps (click Greet task, undock Task Properties, redock Task Properties) should auto-advance when the prompted action completes.
  • Fallback paths: enter step 9 (undock) with Task Properties already floating — the step should show fallback copy and advance on click instead of requiring a drag. Same for step 10 (redock) if the window is already docked.
  • Step 7 should advance on a click anywhere on the Greet task node body, but not on its IO ports (regression check for [data-tour-node="task"] over .react-flow__node).
  • Use the prev arrow to walk back through an interactive step. The direction tracker should let the back-navigation pass through cleanly even if the prompted state can't be replayed in reverse.

Additional Comments

The three interactions here are the minimum set #2306 needs. #2347 adds add-task, add-input, add-output, connect-edge, expand-folder, library-search, and set-argument for the Build Your First Pipeline tour (#2312).

Copy link
Copy Markdown
Collaborator Author

camielvs commented May 21, 2026

@camielvs camielvs mentioned this pull request May 21, 2026
3 tasks
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

🎩 Preview

A preview build has been created at: 05-20-feat_learning_hub_tour_framework_and_first_tour/2e9c602

@camielvs camielvs added the #gsd:50583 Learning Hub label May 21, 2026 — with Graphite App
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 3 times, most recently from 08e1624 to 90d5b9d Compare May 21, 2026 22:07
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from 0f30f2c to 4cc74f0 Compare May 21, 2026 22:07
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from 90d5b9d to d89055f Compare May 21, 2026 22:36
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from 4cc74f0 to fd9690e Compare May 21, 2026 22:37
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 4 times, most recently from a0e7c17 to a98fb46 Compare May 22, 2026 18:40
@camielvs camielvs changed the title feat: Learning Hub Tour Framework and First Tour feat: Learning Hub Tour Framework May 22, 2026
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from a98fb46 to 9f459c8 Compare May 22, 2026 19:29
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from fd9690e to 8c23f4e Compare May 22, 2026 21:53
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from 9f459c8 to e7770ca Compare May 22, 2026 21:53
@camielvs camielvs mentioned this pull request May 22, 2026
8 tasks
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from e7770ca to e26abd3 Compare May 23, 2026 00:09
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from 8c23f4e to b781af4 Compare May 23, 2026 00:12
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 2 times, most recently from d95e8da to 6246686 Compare May 23, 2026 00:21
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from b781af4 to 12125e7 Compare May 23, 2026 00:21
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 2 times, most recently from 5c82cee to 07be379 Compare May 28, 2026 21:07
@camielvs camielvs mentioned this pull request May 28, 2026
3 tasks
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 11 times, most recently from bd097db to 84f39e0 Compare May 29, 2026 18:33
@camielvs camielvs changed the title feat: Learning Hub Tour Framework feat: Guided TOurs Framework May 29, 2026
@camielvs camielvs changed the title feat: Guided TOurs Framework feat: Guided Tours Framework May 29, 2026
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from 84f39e0 to d6d13ae Compare May 29, 2026 19:24
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from b73fea7 to faca533 Compare May 29, 2026 21:22
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from d6d13ae to e97b036 Compare May 29, 2026 21:22
@camielvs camielvs mentioned this pull request May 29, 2026
3 tasks
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from e97b036 to d308ae7 Compare May 29, 2026 21:29
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from faca533 to 879e09d Compare May 29, 2026 21:29
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from d308ae7 to 95b9b2a Compare May 29, 2026 22:33
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from 879e09d to 4bd1952 Compare May 29, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50583 Learning Hub

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant